<p>
	In this demo, you can show a toast by clicking the button below. It will hide itself after a 5 seconds delay unless
	you simply hover it with your mouse.
</p>
<button class="btn btn-primary" (click)="show = true">Click me to show a toast</button>

@if (show) {
	<hr />
	<ngb-toast
		header="Autohide can be cancelled"
		[delay]="5000"
		[autohide]="autohide"
		(mouseenter)="autohide = false"
		(mouseleave)="autohide = true"
		(hide)="show = false; autohide = true"
		[class.bg-warning]="!autohide"
	>
		@if (autohide) {
			<div>Try to mouse hover me.</div>
		} @else {
			<div>I will remain visible until you leave again.</div>
		}
	</ngb-toast>
}
